package com.wms.controller;

import com.wms.bean.ResultBean;
import com.wms.core.R;
import com.wms.param.MaterialConditionParam;
import com.wms.service.QuickArrivalMaterialService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Api(tags = "快捷到货到货——选择物料")
@RestController
@RequestMapping("/arrivalMaterial")
public class QuickArrivalMaterialController {
    @Autowired
    QuickArrivalMaterialService quickArrivalMaterialService;

    @ApiOperation(value = "获取物料列表")
    @GetMapping("/info")
    public ResultBean getAll(){
        List list= quickArrivalMaterialService.getAll();
        return R.success("查询成功",list);
    }

    @ApiOperation(value = "多条件查询物料信息")
    @PostMapping("/condition")
    public ResultBean getByCondition(@RequestBody MaterialConditionParam materialConditionParam){
        List list= quickArrivalMaterialService.getByCondition(materialConditionParam);
        return R.success("查询成功",list);
    }
}
